<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>咸鱼售后下载中心</title>
    <style>
        :root {
            --primary: #4f95cf;
            --accent: #FF9800;
        }

        body {
            font-family: '微软雅黑', sans-serif;
            margin: 0;
            padding: 2rem;
            min-height: 100vh;
            background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                        url('背景图.jpg') center/cover fixed;
            position: relative;
        }

        .background-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255,255,255,0.9);
            z-index: -1;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
        }

 
        .header {
            text-align: center;
            margin-bottom: 3rem;
            padding: 2rem;
            background: linear-gradient(135deg, var(--primary), #1976D2);
            color: white;
            border-radius: 16px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
 
        .download-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
        }
 
        .download-card {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
 
        .download-card:hover {
            transform: translateY(-3px);
        }
 
        .card-title {
            color: var(--primary);
            margin: 0 0 1rem;
            font-size: 1.25rem;
        }
 
        .meta-info {
            color: #666;
            font-size: 0.9em;
            margin-bottom: 1rem;
        }
 
        .download-btn {
            display: block;
            width: 100%;
            padding: 0.8rem;
            background: var(--accent);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
        }
 
        .download-btn::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.3s, height 0.3s;
        }
 
        .download-btn:active::after {
            width: 200px;
            height: 200px;
        }
 
        .loading {
            position: relative;
            pointer-events: none;
        }
 
        .loading::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 20px;
            height: 20px;
            border: 3px solid #fff;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            transform: translate(-50%, -50%);
        }
 
        @keyframes spin {
            to { transform: translate(-50%, -50%) rotate(360deg); }
        }
        @media (max-width: 768px) {
            body {
                padding: 1rem;
            }
            
            .header {
                padding: 1rem;
                border-radius: 12px;
            }
            
            .download-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 480px) {
            .card-title {
                font-size: 1.1rem;
            }
            
            .meta-info {
                font-size: 0.8em;
            }
        }
    </style>
</head>
<body>
    <div class="background-overlay"></div>
    <div class="container">
    <div class="container">
        <div class="header">
            <h1>文件直链下载站</h1>
            <p>点击即下载 ⚡ 无需跳转</p>
       </div>
 
        <div class="download-grid">

            
            <!-- 下载卡片起点 -->
            <div class="download-card">
                <h3 class="card-title">示例软件名</h3>
                <div class="meta-info">
                    <div>版本：v不要下我</div>
                    <div>文件大小：114MB</div>
                    <div>SHA256：114514</div>
                </div>
                <button class="download-btn" 
                        data-url="https://example.com"  
                        data-filename="示例软件.7z" 
                        onclick="handleDownload(this)">
                    立即下载 
                </button>
            </div>
            <!-- 下载卡片终点 -->

        </div>
 
    <script>
        async function handleDownload(btn) {
            const url = btn.dataset.url; 
            const filename = btn.dataset.filename; 
            
            // 添加加载状态 
            btn.classList.add('loading'); 
            btn.textContent  = '准备下载中...';
 
            // 显示确认提示 
            const isConfirm = confirm(`即将下载：${filename}\n\n文件来源：超高速线路 请确认下的文件是否正确`);
            
            if (!isConfirm) {
                btn.classList.remove('loading'); 
                btn.textContent  = '已取消';
                setTimeout(() => btn.textContent  = '立即下载', 1500);
                return;
            }
 
            try {
                // 创建隐藏链接 
                const link = document.createElement('a'); 
                link.href  = url;
                link.download  = filename;
                link.style.display  = 'none';
                
                // 添加安全属性 
                link.rel  = 'noopener noreferrer';
                
                document.body.appendChild(link); 
                link.click(); 
                document.body.removeChild(link); 
 
                // 模拟下载完成状态 
                btn.textContent  = '下载已开始 ✅';
                setTimeout(() => {
                    btn.classList.remove('loading'); 
                    btn.textContent  = '立即下载';
                }, 2000);
 
            } catch (error) {
                btn.textContent  = '下载失败 ❌';
                console.error(' 下载错误:', error);
                setTimeout(() => {
                    btn.classList.remove('loading'); 
                    btn.textContent  = '立即下载';
                }, 2000);
            }
        }
    </script>
</body>
</html>